package com.uzykj.modules.blog.service;

import com.uzykj.core.service.CrudService;
import com.uzykj.modules.blog.entity.BlogReview;
import com.uzykj.modules.blog.mapper.BlogReviewMapper;
import com.uzykj.modules.iim.entity.ChatPage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ghostxbh
 * @date 2020/7/8
 * @description
 */
@Service
@Transactional(readOnly = true)
public class BlogReviewService extends CrudService<BlogReviewMapper, BlogReview> {
    public BlogReview get(String id) {
        return super.get(id);
    }

    public ChatPage<BlogReview> findPage(ChatPage<BlogReview> page, BlogReview entity) {
        entity.setPage(page);
        page.setList(mapper.findList(entity));
        return page;
    }

    @Transactional(readOnly = false)
    public void save(BlogReview review) {
        super.save(review);
    }

    @Transactional(readOnly = false)
    public void delete(BlogReview review) {
        super.delete(review);
    }
}
